Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid having every access of Bounds or Frame allocate a new Rect #7049

Merged
merged 6 commits into from May 12, 2022

Conversation

hartez
Copy link
Contributor

@hartez hartez commented May 11, 2022

Description of Change

Every access of Frame (or Bounds) in VisualElement was creating a new Rect by accessing four BindableProperties, which is not ideal from a performance perspective.

These changes track the Frame/Bounds Rect locally, and consolidate the updating of the X/Y/Width/Height bindable properties in one method.

@Redth Redth requested a review from PureWeen May 11, 2022 20:19
@Eilon Eilon added legacy-area-perf Startup / Runtime performance legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 11, 2022
@Redth Redth added this to the 6.0.300 milestone May 11, 2022
@hartez hartez requested a review from a team as a code owner May 12, 2022 02:20
@rmarinho rmarinho merged commit 34e224d into main May 12, 2022
@rmarinho rmarinho deleted the reduce-bounds-allocations branch May 12, 2022 10:07
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@Eilon Eilon added t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) and removed legacy-area-perf Startup / Runtime performance labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants